package cn.bdqn.applysystem.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import cn.bdqn.applysystem.dao.GradeMapper;
import cn.bdqn.applysystem.entity.Grade;
import cn.bdqn.applysystem.service.GradeService;
@Service("gradeServiceImpl")
public class GradeServiceImpl implements GradeService {

	@Autowired
	@Qualifier("gradeMapper")
	GradeMapper gradeMapper;
	
	@Override
	@Transactional(isolation=Isolation.READ_COMMITTED,propagation=Propagation.SUPPORTS)
	public List<Grade> getGradeBySubjectId(Integer subjectId) {
		return gradeMapper.gradeListBySubjectId(subjectId);
	}

	@Override
	@Transactional(isolation=Isolation.READ_COMMITTED,propagation=Propagation.SUPPORTS)
	public List<Grade> findGradeListByHeadTeacherId(Integer headTeacherId) {
		return gradeMapper.findGradeListByHeadTeacherId(headTeacherId);
	}

}
